-- CALC_CAREER_216_UPGRADE_BONUS

-- 计算称号大精灵王升级奖励
-- @param level    特性等级
-- @param feature  特性id
return function(level, feature)
    local bonusList = {};
    local itemBonus = {};

    -- 如果学习过“暗行者”称号
    if CareerM.hasJoined(204) then
        -- 奖励精灵的灯芯
        itemBonus = { 1, 7308, 1 };
    else
        -- 奖励精灵之矢，天空副本中获得无效的对应物品
        local dungeonId = DungeonM.getDungeonId();
        if type(dungeonId) == "number" and dungeonId > 0 and
            DungeonAreaM.query(dungeonId, "type") == "sky_instance" or 
            type(dungeonId) == "number" and dungeonId > 0 and
            DungeonAreaM.query(dungeonId, "type") == "activity" then
            itemBonus = { 1, 7939, 1 };
        else
            itemBonus = { 1, 7310, 1 };
        end
    end

    table.insert(bonusList, itemBonus);
    return bonusList;
end

